package BehavioralMode.state.elevator.elevatorState;

import BehavioralMode.state.elevator.Context;
import BehavioralMode.state.elevator.ElevatorState;

public class RunState extends ElevatorState {
    @Override
    public void open() {
        System.out.println("电梯运行中无法打开");
    }

    @Override
    public void close() {
        System.out.println("电梯处于运行状态中,请勿操作关闭");
    }

    @Override
    public void run() {
        System.out.println("电梯运行");
    }

    @Override
    public void stop() {
        super.context.setElevatorState(Context.stopState);
        super.context.getElevatorState().stop();
    }
}
